import express from 'express';
import thirdApi from '../controllers/third_api';
import read_card from '../controllers/read_card';

const router = express.Router();

// 设备调用接口
router.get('/new_wx_message', thirdApi.newWxMessage);
router.get('/get_wx_audio', thirdApi.getWxAudio);
router.get('/device_online', thirdApi.deviceOnlineNotification);
router.get('/get_card_url', read_card.getCardUrl);
router.get('/audio_changed', thirdApi.audioChanged);
router.get('/device_info_changed', thirdApi.deviceInfoChanged);
router.get('/get_wx_access_token', thirdApi.getWxAccessTokenToDevice);
router.get('/play_category', thirdApi.playCategory);
router.get('/device_collect_audio', thirdApi.deviceCollectAudio);

// 百度服务器验证Token
router.get('/token', thirdApi.verifyBaiduToken);

// 自定义播放列表
router.post('/custom_play_list',thirdApi.customPlayList);
router.post('/baidu_voice_info', thirdApi.saveBaiduVoiceInfo);
router.post('/add_public_platform',thirdApi.reloadPublicPlatform);

export default router;